package com.leyou.common.vo;

import com.leyou.common.enums.LyEnum;
import lombok.Data;

@Data
public class ExceptionResult {
    private int status;
    private String message;
    private long timestamp;

    public ExceptionResult(LyEnum lyEnum) {
        status = lyEnum.getCode();
        message = lyEnum.getMessage();
        timestamp = System.currentTimeMillis();
    }

    public ExceptionResult() {
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public long getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(long timestamp) {
        this.timestamp = timestamp;
    }
}
